package com.turtle3d.exporter;

import java.util.ArrayList;

/**
 * <p>This class represents an object created from faces.</p>
 * 
 * <p>It's a helper class for ObjExporter.</p>
 * 
 * @author Marek Paterczyk <marek.paterczyk@gmail.com>
 *
 */
public class FaceObject implements Comparable<FaceObject>
{
	private ArrayList<Face> faces = new ArrayList<Face>();
	private String name;
	private int materialIndex;
		
	public FaceObject(String name)
	{
		super();
		this.name = name;
	}

	public void addFace(Face face){
		faces.add(face);
	}

	public ArrayList<Face> getFaces()
	{
		return faces;
	}

	public String getName()
	{
		return name;
	}

	public int getMaterialIndex()
	{
		return materialIndex;
	}

	public void setMaterialIndex(int materialIndex)
	{
		this.materialIndex = materialIndex;
	}

	public int compareTo(FaceObject o)
	{
		return materialIndex-o.materialIndex;
	}
	
	
	

	
	

}
